<?php get_backend_header(array(
        'ckeditor/ckeditor.js',
	'jquery/validate/jquery.validate.js',
	'jquery/validate/additional-methods.js',
	'cms.js',
), array(
	'jquery/ui.jqgrid.css'
)); ?>

<h2 class="title"><?php echo ($information_id) ?  'Edit' : 'Add'; ?> Information</h2>

<form id="cms_form" name="cms_form" class="form" method="POST" enctype="multipart/form-data" action="<?php echo site_url('cms/submit'); ?>">
	<input type="hidden" id="information_id" name="information_id" value="<?php echo $information_id; ?>" />

            <div class="unit">
                
                
                <div class="line">
                        <label for="" class="">Content type:</label>
                        <div class="field" style="height:auto">
                            <input type="radio" name="content_type" id="content_type" value="How It Works" <?php if ($information_type == 'How It Works') {echo 'checked="checked"';} else { echo 'disabled="true"'; }?>/> How It Works<br />
                            <input type="radio" name="content_type" id="content_type" value="Courses" <?php if ($information_type == 'Courses') {echo 'checked="checked"';} else { echo 'disabled="true"'; }?>/> Courses<br />
                            <input type="radio" name="content_type" id="content_type" value="Contact" <?php if ($information_type == 'Contact') {echo 'checked="checked"';} else { echo 'disabled="true"'; }?>/> Contact<br />
                            <input type="radio" name="content_type" id="content_type" value="FAQ" <?php if ($information_type == 'FAQ') {echo 'checked="checked"';} else { echo 'disabled="true"'; }?>/> FAQ<br />
                            <input type="radio" name="content_type" id="content_type" value="About" <?php if ($information_type == 'About') {echo 'checked="checked"';} else { echo 'disabled="true"'; }?>/>About
                        </div>
                </div>
                
                <div class="line">
                        <label for="" class="">Content:</label>
                        <div class="field" style="height:auto; width:auto;">
                            <textarea id="content" name="content" class="ckeditor"><?php echo $content;?></textarea>
                        </div>
                </div>


            </div>


        <div class ="clear"></div>

	<div class="buttons">
		<button id="save" name="save" > Save </button>
		<a href="<?php echo site_url('cms/list_records'); ?>" id="cancel" name="cancel">Cancel</a>
	</div>
</form>


<script type="text/javascript">
        cmsRules();


	$('#cancel').button({
		icons: {primary: 'ui-icon-arrowreturn-1-w'}
	});	
	
	$('#save').button({
		icons: {primary: 'ui-icon-disk'}
	}).click(function(e) {
		$(this).removeClass('ui-state-focus');
		$('#cms_form').submit();
		e.preventDefault();
	});	

</script>

<?php get_backend_footer(); ?>
